<p>Calculates the distance of each pixel from the outlet, measured along the drainage directions. By aggregating the matrix so obtained, we
get the so called <i>width function</i>. It can evaluate the distance  as a projection of the plan or the real distance (3d mode).
</p>
<BR>
The program can work in three different ways: 
<ol>
<li> calculate the distance (projected on the plane)  from the outlet in pixel number (pMode = 0)</li>
<li> calculate the distance (projected on the plane)  from the outlet in meters on the plane (pMode = 1)</li>
<li> calculate the distance (in 3d) from the outlet in meters in 3d (pMode = 1 and the inPit map not null)</li>
</ol>
<br>
<br>
<h3>Inputs</h3>
<ul>  
<li> The GridCoverage containing the matrix of the drainage directions (obtained with [Markoutlets]);</li>
<li> The GridCoverage of elevations (obtained with [Pitﬁller]) if it run in 3d mode;</li>
</ul>
<br>
<br>
<h3>Output</h3>
<ul>  
<li> The GridCoverage containing the matrix of the distances.</li>
</ul>
<br>
<br
<h3>References</h3>
<ul>
<li>[Bibliography#15, 15] P. D’Odorico, 2003</li>
<li>[Bibliography#16, 16] M. Kirkby, 1986</li>
</ul>